﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Epona.AOP.Cache;

namespace Epona.Session
{
    public class SessionManager
    {
        public int Count()
        {
            return new RedisCacheRepository().GetKeys(Session.SESSIONNAME + "*").Count;
        }

        public bool Delete(string sessionId)
        {
            return new RedisCacheRepository().Delete(sessionId);
        }

        public object Get(string sessionId)
        {
            return new RedisCacheRepository().Get(sessionId);
        }
    }
}
